package com.gagakuai.bpm.dao.mapper.camunda;

import com.baomidou.mybatisplus.core.metadata.IPage;

import com.gagakuai.bpm.domian.entity.camuda.WorkFlowInstence;
import com.gagakuai.bpm.domian.query.camunda.WorkflowQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorkFlowInstenceMapper {
    int deleteByPrimaryKey(String id);

    int insert(WorkFlowInstence record);

    int insertOrUpdate(WorkFlowInstence record);

    int insertOrUpdateSelective(WorkFlowInstence record);

    int insertSelective(WorkFlowInstence record);

    WorkFlowInstence selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(WorkFlowInstence record);

    int updateByPrimaryKey(WorkFlowInstence record);

    int updateBatch(List<WorkFlowInstence> list);

    int batchInsert(@Param("list") List<WorkFlowInstence> list);


    /*
     * 查询用户的申请流程
     */
    IPage<WorkFlowInstence> selectApplyProcessByUer(IPage<WorkFlowInstence> pageDto,
                                                    @Param("workflowQueryDto") WorkflowQuery workflowQueryDto,
                                                    @Param("userId") String userId);

    /*
     *
     * 获取已经完成的流程实列
     */
    List<String> selectIsNotActiveProcoessList(@Param("processList")List<String> processList);

    List<String> selectProcesList();
}